package com.vt.admin.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 日志表
 */
@Data
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty("日志类型")
    @NotBlank(message = "日志类型不能为空")
    private String type;

    @ApiModelProperty("日志标题")
    @NotBlank(message = "日志标题不能为空")
    private String title;

    @ApiModelProperty("创建者")
    private String createBy;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty("操作IP地址")
    private String remoteAddr;

    @ApiModelProperty("用户代理")
    private String userAgent;

    @ApiModelProperty("请求URI")
    private String requestUri;

    @ApiModelProperty("操作方式")
    private String method;

    @ApiModelProperty("操作提交的数据")
    private String params;

    @ApiModelProperty("执行时间")
    private Long time;

    @ApiModelProperty("删除标记")
    @TableLogic
    private String delFlag;

    @ApiModelProperty("异常信息")
    private String exception;

    @ApiModelProperty("服务ID")
    private String serviceId;
}
